﻿using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Rescue_of_the_Dwarvenzombies.SceneObjects;
using Rescue_of_the_Dwarvenzombies.SceneObjects.GameObjects;
using Rescue_of_the_Dwarvenzombies.SceneObjects.GameObjects.Obstacles;

namespace Rescue_of_the_Dwarvenzombies.Scene.Levels
{
    /// <summary>
    /// The abstract class all concrete levels inherit.
    /// </summary>
    /// <remarks></remarks>
    internal abstract class Level : ILevel
    {

        protected int LevelId;
        protected ISceneObject _ground ;
        protected List<ISceneObject> _holes;
        protected List<ISceneObject> _stones;
        protected List<ISceneObject> _walls;
        /// <summary>
        /// The starting positions of the players
        /// </summary>
        protected Vector2[] _startingPos;
        /// <summary>
        /// The spawning positions of the enemies
        /// </summary>
        protected Vector2[] _spawningPos;

        /// <summary>
        /// The Total number of enemies of the level.
        /// </summary>
        protected int amountOfEnemies = 9;




        /// <summary>
        /// Initializes a new instance of the <see cref="LevelID"/> class.
        /// </summary>
        /// <remarks></remarks>
        public Level()
        {

        }

        /// <summary>
        /// Gets the amount of enemies.
        /// </summary>
        /// <returns></returns>
        /// <remarks></remarks>
        public int GetAmountOfEnemies()
        {
            return amountOfEnemies;
        }


        /// <summary>
        /// Gets the spawning positions.
        /// </summary>
        /// <returns>The spawning positions as a Vector2[]</returns>
        /// <remarks></remarks>
        internal Vector2[] GetSpawningPositions()
        {
            return _spawningPos;
        }

        public List<ISceneObject> GetWalls()
        {
            return _walls;
        }

        public List<ISceneObject> GetStones()
        {
            return _stones;
        }

        public List<ISceneObject> GetHoles()
        {
            return _holes;
        }

        public Vector2[] GetSpawningPos()
        {
            return _spawningPos;
        }

        public Vector2 GetPlayerStartingPos(int playerIndex)
        {
            return _startingPos[playerIndex];
        }

        public ISceneObject GetGround()
        {
            return _ground;
        }
    }
}